<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <!-- 引用模板 Header -->
    <div th:insert="bg/publicHead :: publicHead(${pageName})"></div>
    <!-- [ Header ] end -->

    <style type="text/css">
        .inputStyle{ padding:0px !important; }
        i{ cursor:pointer; }
        .red{ color:#FF3535; font-weight:700; }
        .blue{color:#0000ff; font-weight:700;}
        .img{width:50px; height:50px;}
        .Export{ display:flex; justify-content:flex-start; align-items:center; }
        .Export div{ margin-right:10px; }
    </style>
    <script src="/js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="/js/stroage.js" type="text/javascript" charset="UTF-8"></script>
    <script src="/js/comm.js" type="text/javascript" charset="UTF-8"></script>
    <script th:inline="javascript">
        window.onerror=function(){return true;};
        var reg=/^1((34[0-8]\d{7})|((3[0-3|5-9])|(4[5-7|9])|(5[0-3|5-9])|(66)|(7[2-3|5-8])|(8[0-9])|(9[1|8|9]))\d{8})$/
        var ServerIP=[(${ServerIP!=null?'"'+ServerIP+'"':'"'+'"'})];
        $(document).ready(function() {

            if(myStorage.getItem("token")===null || myStorage.getItem("token")===''){
                window.location.href="/bg/login";
            }

            if(myStorage.getItem("startDate")!=null){
                $(".startDate").val(myStorage.getItem("startDate"));
            }
            if(myStorage.getItem("endDate")!=null){
                $(".endDate").val(myStorage.getItem("endDate"));
            }

            $(".selectData").click(function(){
                var startDate=$(".startDate").val();
                var endDate=$(".endDate").val();
                if(/\S/.test(startDate)===false){
                    alert("请输入开始日期");
                    $(".startDate").focus();
                    return;
                }
                if(/\S/.test(endDate)===false){
                    alert("请输入结束日期");
                    $(".startDate").focus();
                    return;
                }
                myStorage.setItem("startDate",startDate);
                myStorage.setItem("endDate",endDate);
                window.location.href="/bg/oilorder/"+startDate+"/"+endDate;
            });

            $(".exportData").click(function(){
                var startDate=$(".startDate").val();
                var endDate=$(".endDate").val();
                if(/\S/.test(startDate)===false){
                    alert("请输入开始日期");
                    $(".startDate").focus();
                    return;
                }
                if(/\S/.test(endDate)===false){
                    alert("请输入结束日期");
                    $(".startDate").focus();
                    return;
                }
                window.location.href="/bg/api/downLoadExcel/"+startDate+"/"+endDate;
            });



        });
    </script>
</head>


<body class="background-img-7">

<!-- [ navigation menu ] start -->
<!-- 引用模板 Header -->
<div th:insert="bg/templateLeft :: Menu(${pageName})"></div>
<!-- [ navigation menu ] end -->


<!-- [ Header ] start -->
<!-- 引用模板 Header -->
<div th:insert="bg/templateTop :: Header"></div>
<!-- [ Header ] end -->


<!-- [ Main Content ] start -->
<div class="pcoded-main-container"> <!--中间 Start -->

    <div class="pcoded-content">

        <!-- [ homePage ] start -->
        <!-- 引用模板 homePage -->
        <div th:insert="bg/homePage :: homePage"></div>
        <!-- [ homePage ] end -->


        <!-- [ Main Content ] start -->
        <!-- [ 内容区域 ] start -->
        <div class="row">
            <!-- 课程列表 -->

            <div class="col-xl-12 mainCotent">
                <h5><text th:text="${pageName}"></text></h5>
                <h5>欢迎回来，五金商城管理系统！</h5>
            </div>
        </div> <!-- [ Main Content ] end -->

    </div>

</div> <!--中间 End -->


<!-- 引用模板 Bottom -->
<div th:insert="bg/publicBottom :: publicBottom"></div>
<!-- [ Bottom ] end -->


<script src="/js/sweetalert.min.js"></script>

</body>



</html>